﻿using ParkSaleSDK.Adapter;
using ParkSaleSDK.Data;
using ParkSaleSDK.Modularity;
using ReadOnlyParkSaleAdapter;
using System;
using System.Collections.Generic;
using static SystemSetting.SystemAdapters;

namespace SystemData
{
    [Serializable]
    public class OuterDiscount
    {
        public int OrderID
        {
            get;
            set;
        }
        public UserDiscount Discount { get; set; }

        public String Content
        {
            get;
            set;
        }

        public double AfterPrice
        {
            get;
            set;
        }
    }
    [Serializable]
    public class CodeInfo
    {
        public string Token
        {
            get;
            set;
        }
        public double Remaining
        {
            get;
            set;
        }
    }
    [Serializable]
    public class LoginResult
    {
        public int result
        {
            get;
            set;
        }
        public safe_User userinfo
        {
            get;
            set;
        }
        public HouseInfo[] houseinfo
        {
            get;
            set;
        }
        public TraitInfo likeInfo
        {
            get;
            set;
        }
    }


    [Serializable]
    public class FaceCheckResult
    {
        public int SIGNED
        {
            get;
            set;
        }
        public int ResultCode
        {
            get;
            set;
        }
        public CodeInfo Token
        {
            get;
            set;
        }
        public string FaceID
        {
            get;
            set;
        }
    }



    [Serializable]
    public class HouseInfo
    {
        public Location Location
        {
            get;
            set;
        }
        public OwnedHouse House
        {
            get;
            set;
        }
    }

    [Serializable]
    public class RegisterData
    {
        public string id
        {
            get;
            set;
        }
        public string username
        {
            get;
            set;
        }
        public string password
        {
            get;
            set;
        }
        public byte[] facedata
        {
            get;
            set;
        }
        public string Phone
        {
            get;
            set;
        }
        public int location
        {
            get;
            set;
        }
        public int house
        {
            get;
            set;
        }
        public int num
        {
            get;
            set;
        }
    }




    [Serializable]
    public class DiscountInfo
    {

        public DiscountInfo()
        {

        }
        IDiscount d;
        public DiscountInfo(IDiscount discount)
        {
            d = discount;
        }

        public string About
        {
            get => d != null ? d.About() : "当前系统中并无此优惠";
        }
        public string Name
        {
            get => d != null ? d.Name() : "无效优惠券";
        }
        public UserDiscount Discount
        {
            get;
            set;
        }

    }


    [Serializable]
    public class SurveyFeature
    {
        public string Name
        {
            get;
            set;
        }
        public string About
        {
            get;
            set;
        }

    }
    [Serializable]
    public class ParkResult
    {
        public Park Park
        {
            get;
            set;
        }
        public TraitInfo Trait
        {
            get;
            set;
        }
        public string[] ImgPaths
        {
            get;
            set;
        }
        public int OrderedCount
        {
            get;
            set;
        }
    }


    [Serializable]
    public class ParkingRights
    {


        public Rights Right
        {
            get;
            set;
        }
        public ParkSaleSDK.Data.Park Park
        {
            get;
            set;
        }
        public TraitInfo Trait
        {
            get;
            set;
        }

    }

    [Serializable]
    public class LocationInfo
    {
        public Location Location
        {
            set;
            get;
        }
        public int ParkNumber
        {
            get;
            set;
        }
        public Company[] Company
        {
            get;
            set;
        }
    }

}
